 package com.ia2014.tp.portal2.entities;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;

import com.ia2014.tp.portal2.entities.Articulo;
import com.ia2014.tp.portal2.vo.ArticuloModaVO;
import com.ia2014.tp.portal2.vo.ArticuloVO;

@Entity
@DiscriminatorValue(value = "Moda")
public class ArticuloModa extends Articulo{
	
	private String talle;
	private String color;

	public String getTalle() {
		return talle;
	}

	public void setTalle(String talle) {
		this.talle = talle;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	@Transient
	@Override
	public ArticuloModaVO getVO() {
		ArticuloModaVO articuloModaVO = (ArticuloModaVO) super.getVO();
		
		articuloModaVO.setTalle(talle);
		articuloModaVO.setColor(color);
		
		return articuloModaVO;
	}

	@Transient
	public void setVO(ArticuloVO vo) {
		ArticuloModaVO articuloModaVO = vo.getArticuloModaVO();
		
		super.setVO(articuloModaVO);
		
		this.setTalle(articuloModaVO.getTalle());
		this.setColor(articuloModaVO.getColor());
	}

	@Transient
	@Override
	protected ArticuloModaVO getVOInstance() {
		return new ArticuloModaVO();
	}

	@Transient
	@Override
	public boolean isArticuloElectrodomestico() {
		// TODO Auto-generated method stub
		return false;
	}

	@Transient
	@Override
	public boolean isArticuloInfantil() {
		// TODO Auto-generated method stub
		return false;
	}

	@Transient
	@Override
	public boolean isArticuloModa() {
		// TODO Auto-generated method stub
		return true;
	}

	@Transient
	@Override
	public boolean isArticuloMueble() {
		// TODO Auto-generated method stub
		return false;
	}

	@Transient
	@Override
	public String getCategoria() {
		// TODO Auto-generated method stub
		return "moda";
	}
}
